package com.ddyx.service.product.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 品牌
 * </p>
 *
 * @author agula
 * @since 2019-08-06
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("p_goods_brand")
public class GoodsBrand extends Model<GoodsBrand> {

    private static final long serialVersionUID=1L;

    /**
     * 品牌ID
     */
    @TableId(value = "brand_id", type = IdType.AUTO)
    private Integer brandId;

    /**
     * 品牌名称
     */
    private String brandName;

    /**
     * Logo图URL
     */
    private String logoUrl;

    /**
     * 品牌描述
     */
    private String brandDesc;

    /**
     * 创建时间
     */
    private LocalDateTime gmtCreate;

    /**
     * 修改时间
     */
    private LocalDateTime gmtModified;


    @Override
    protected Serializable pkVal() {
        return this.brandId;
    }

    @Override
    public String toString() {
        return "GoodsBrand{" +
        "brandId=" + brandId +
        ", brandName=" + brandName +
        ", logoUrl=" + logoUrl +
        ", brandDesc=" + brandDesc +
        ", gmtCreate=" + gmtCreate +
        ", gmtModified=" + gmtModified +
        "}";
    }
}
